package com.jn.principle.liskov;

/**
 * 里氏替换原则
 *
 * @author 江南大学1033190417
 * @date 2022/4/9 23:30
 */
public class LisKov {
    public static void main(String[] args) {
        System.out.println(new B().func1(1, 3));
    }
}

//A类
class A{

    public int func1(int num1,int num2){
        return num1-num2;
    }
}

//B类
class B extends A{

    @Override
    public int func1(int num1, int num2) {
        return num1+num2;
    }

    public int func2(int a,int b){
        return func1(a,b)+9;
    }
}